package com.authsphere.common.enums;

/**
 * @program: AuthSphere
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/27 21:53
 **/
public enum AlgorithmType {

    NONE("none"),
    AES("aes"),
    RSA("rsa"),
    JWT("jwt"),
    ;

    private final String type;

    AlgorithmType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static AlgorithmType getAlgorithmType(String type) {
        for (AlgorithmType algorithmType : AlgorithmType.values()) {
            if (algorithmType.getType().equals(type)) {
                return algorithmType;
            }
        }
        return NONE;
    }
}
